import { mpRequest } from "@/utils/request";

export const apiQueryBannerList = () => {
  return mpRequest({
    url: "/banner",
    method: "get",
  });
};

/**
 * 任务列表
 */
export const apiQueryMissionList = () => {
  return mpRequest({
    url: "/mission",
    method: "get",
  });
};

export const apiQueryRecommend = () => {
  return mpRequest({
    url: "/article/recommend",
    method: "get",
  });
};

export const apiQueryRecommendDetail = (id: string) => {
  return mpRequest({
    url: `/article/detail/${id}`,
    method: "get",
  });
};

/**
 * 获取问卷调查表
 */
export const apiQuerySurveyList = () => {
  return mpRequest({
    url: "/survey",
  });
};

/**
 * 获取置顶推荐文章
 */
export const apiQueryRecommendTop = () => {
  return mpRequest({
    url: "/article/recommend/top",
    method: "get",
  });
};

/**
 * 天气
 */
export const apiWeatherForecast = () => {
  return mpRequest({
    url: "/weather/forecast",
    method: "get",
  });
};
